.TH std::basic_spanstream::basic_spanstream 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::basic_spanstream::basic_spanstream \- std::basic_spanstream::basic_spanstream

.SH Synopsis
   explicit basic_spanstream( std::span<CharT> s,
   std::ios_base::openmode mode =                                     \fB(1)\fP (since C++23)
                                  std::ios_base::in |
   std::ios_base::out );
   basic_spanstream( basic_spanstream&& rhs );                        \fB(2)\fP (since C++23)
   basic_spanstream( const basic_spanstream& ) = delete;              \fB(3)\fP (since C++23)

   Constructs a new basic_spanstream.

   1) Uses the storage referenced by s as initial underlying buffer of the wrapped
   std::basic_spanbuf device. The wrapped std::basic_spanbuf object is constructed as
   basic_spanbuf<Char, Traits>(s, mode).
   2) Move constructor. Move constructs the std::basic_iostream base subobject and the
   wrapped std::basic_spanbuf from those of rhs, and then calls set_rdbuf with the
   address of the wrapped std::basic_spanbuf in *this to install it.
   3) Copy constructor is deleted. basic_spanstream is not copyable.

.SH Parameters

   s     - std::span referencing the storage to be use as initial underlying buffer of
           stream
           specifies stream open mode. Following constants and bit-wise OR between them
           may be used:

           Constant          Explanation
           app               seek to the end of stream before each write
   mode  - binary            open in binary mode
           in                open for reading
           out               open for writing
           trunc             discard the contents of the stream when opening
           ate               seek to the end of stream immediately after open
           noreplace (C++23) open in exclusive mode
   other - another basic_spanstream to be moved from

.SH Exceptions

   May throw implementation-defined exceptions.

.SH Example

    This section is incomplete
    Reason: no example

.SH See also

   constructor   constructs a basic_spanbuf object
   (C++23)       \fI(public member function of std::basic_spanbuf<CharT,Traits>)\fP

.SH Category:
     * Todo no example
